<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var obj = [
            {name:"zheng",age:18,skill:"vue"},
            {name:"zhang",age:17,skill:"js"},
            {name:"liu",age:20,skill:"html"}
        ]
        /* arr = [{name:"xx",skill:"xxx"},{name:"xx",skill:"xxx"}] */
        var arr = []
        for(var i=0;i<obj.length;i++){
            /* var name = obj[i].name;
            var skill = obj[i].skill; */
            var {name,skill} = obj[i]
            arr.push({
                /* name:name,
                skill:skill */
                name,
                skill
            })
        }
        console.log(arr);
    </script>
</body>
</html>